package com.yjt.fresh.adpater;

import android.support.annotation.Nullable;
import android.text.Html;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yjt.fresh.R;
import com.yjt.fresh.bean.BeanHomePage;
import com.yjt.fresh.bean.BeanMessage;

import java.util.List;

/**
 * 消息
 * Created by mcc on 2018/6/10.
 */

public class AdpRvAtyMassage extends BaseQuickAdapter<BeanMessage, BaseViewHolder> {
    public AdpRvAtyMassage(int layoutResId, @Nullable List<BeanMessage> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BeanMessage item) {
        TextView tvTitle = helper.getView(R.id.tvAppRecycleItemMassagesTitle);
        TextView tvContent = helper.getView(R.id.tvAppRecycleItemMassagesContent);
        TextView tvTime = helper.getView(R.id.tvAppRecycleItemMassagesTime);
        tvTitle.setText(item.getTITLE());
        tvContent.setText(Html.fromHtml(item.getCONTENT()));
        tvTime.setText(item.getCREATE_TIME());
    }
}
